<%@ page language="java" import="com.bjsxt.shopping.user.*"
	pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>



<%
	
String status = request.getParameter("status");
System.out.println(status);

User u = (User)session.getAttribute("user");

//会话过期
if(null==u){
	response.sendRedirect("UserLogin.jsp");
	return;
}
	String loginname = u.getLoginname();
	
	String transorLoginName = request.getParameter("transorLoginName");
if(status != null){
	
		User.updateStatus(transorLoginName,status);
}
%>
	
<%	

	final int PAGE_SIZE = 8;
	int pageNo = 1;
	String strPageNo = request.getParameter("pageNo");
	if (strPageNo != null && !strPageNo.trim().equals("")) {
		try {
	pageNo = Integer.parseInt(strPageNo);
		} catch (NumberFormatException e) {
	pageNo = 1;
		}
	}
	if (pageNo <= 0)
		pageNo = 1;
	// int categoryId = Integer.parseInt(request.getParameter("categoryId"));
	
	int categoryId =1;
	
	List<User> users = new ArrayList<User>();
	users = User.getWaitAuditTranslators();
	int totalRecords = users.size() ;

	int totalPages = (totalRecords + PAGE_SIZE - 1) / PAGE_SIZE;

	if (pageNo > totalPages)
		pageNo = totalPages;
%>

<html>
	<head>

		<meta http-equiv="Content-Language" content="zh-cn">
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<title>--译者注册试题审核</title>

		<link href="images/new.css" rel="stylesheet" type="text/css">
		<script language="javascript1.2">
function js_callpage(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=2,width=360,height=470');
	return false;
}
function js_callpage1(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,width=100,height=100');
	return false;
}
</script>




	</head>
	<body>
		<table align="center" border="0" cellpadding="0" cellspacing="0"
			width="980">
			<tbody>


				<tr>
					<td bgcolor="#dadce8" height="1">
						<img src="images/line.gif" height="1" width="1">
					</td>
				</tr>

				<tr>
					<td>
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td bgcolor="#e5e5f0" valign="top" width="190">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tbody>
												<tr>
													
												</tr>
												<tr>
													<td>
														<img src="images/gg11.jpg" height="60" width="180">
													</td>
												</tr>


										</table>
									</td>
									<td width="10">
									</td>
									<td valign="top" colspan="1">
										<table style="border-collapse: collapse;" border="1"
											bordercolor="#111111" cellpadding="0" cellspacing="0"
											height="417" width="100%">
											<tbody>


												<tr>
													<td height="119" colspan="6">
														<table style="border-collapse: collapse;" border="0"
															bordercolor="#111111" cellpadding="0" cellspacing="0"
															width="100%">
															<tbody>
																								<br>
																								<tr>
																									<td align="right">
																										<font  size="2" color="blue">&nbsp;&nbsp;&nbsp;&nbsp; 
																										&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<%=loginname%> ,  欢迎您！</font>
																										<a href="TransAudit.jsp"><font style="font-weight:bold;color:blue;TEXT-DECORATION: underline; ">返回</font></a>
																											&nbsp;&nbsp;
																									</td>
																								</tr>
																								<tr>
																									<td>
																										&nbsp;
																										<img src="images/m_33.gif" height="10"
																											width="10">
																										&nbsp;
																										<strong><a
																											href="">译者注册试题审核</a>
																										</strong> &nbsp;
																									</td>
																								</tr>
																								
																								<tr>																									
																									<form method="post"
																										action="index_catalog.php?pma_code=21&amp;cat_code=107&amp;sub_cat_code=&amp;mfname_sel=&amp;sortby=pdate&amp;onepcd=&amp;nowpcd="></form>
																									<td align="right">
																										全部
																										<b><%=totalRecords%> </b>篇文章,共
																										<b><%=totalPages%> </b>页,当前第
																										<b><%=pageNo%> </b>页&nbsp;&nbsp;
																										<select size="1" name="pagenum" class="input"
																											onChange="submit()">
																											<option value="1" selected="selected">
																												第1页
																											</option>
																										</select>
																									</td>
																								</tr>


																							</tbody>
																						</table>
																					</td>
																				</tr>

																				<tr>
																					<td align="center" width="7%">译者用户名</td>
																					<td align="center" width="8%">注册申请日期</td>
																					<td align="center" width="26%">注册试题原文</td>
																					<td align="center" width="26%">注册试题译文</td>
																					<td align="center" width="8%">审核操作</td>
																				</tr>
																				
																				<%
																						if( users.size()==0) {
																				%>
																				<tr>
																					<td align="center" colspan="5">没有需审核的译者！</td>
																				
																				</tr>
																				<%
																						}
																				%>																				


																				<%
																						for (int i = 0; i < users.size(); i++) {
																						User p = users.get(i);
																				%>																			

																				
																				<tr>
																				 	<td align="center"><%=p.getLoginname()%></td>
																				 	<td><%=p.getRdate()%></td>
																				 	<td><%=p.getTests()%></td>
																				 	<td><%=p.getTestsTrans()%></td>
																				 	
																				 	<td align="center">
																				 	<a	href="AuditTranslatorTest.jsp?transorLoginName=<%=p.getLoginname()%>&status=1" class="mingcheng1"> 通过 </a>
																				 	<a	href="AuditTranslatorTest.jsp?transorLoginName=<%=p.getLoginname()%>&status=2" class="mingcheng1"> 不通过 </a>
																				 	</td>
																				 
																				</tr>
																				
																				<%
																				} // end for
																				%>																				

																			
																		</table>
																	</td>
																</tr>

															</tbody>
														</table>
													</td>
												</tr>
												<tr>
													<td height="30">
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<td width="100%">
						<!--底部INC--><br>
					</td>
				</tr>
			</tbody>
		</table>

	</body>
</html>
